package com.jkdz.spyke.rs
{
	import com.jkgh.remedy.core.client.*;
	import flash.utils.ByteArray;

	public class SpykeServerRemoter implements RemedyRemoter
	{
		private var mo:SpykeServer;

		public function SpykeServerRemoter(mo:SpykeServer)
		{
			this.mo = mo;
		}

		public function call(methodID:int, connection:RemedyClientServerConnection, onReturn:Function):void
		{
			switch (methodID)
			{
				case 56:
					mo.createNewRoom(function(ret:SpykeRoom):void {
						onReturn(ret, RemedyMOClassManager.INSTANCE);
					});
					break;
				case 55:
					var a_55:String = (String)(RemedyStringClassManager.INSTANCE.readWithGraph(connection, new Vector.<Object>()));
					mo.connectToRoom(a_55, function(ret:SpykeRoom):void {
						onReturn(ret, RemedyMOClassManager.INSTANCE);
					});
					break;
			}
		}

		public function run(methodID:int, connection:RemedyClientServerConnection):void
		{
			switch (methodID)
			{
			}
		}
	}
}
